package top.kaoshanji.p2ch18a;

import top.kaoshanji.p2ch18a.support.TaskA;
import top.kaoshanji.p2ch18a.support.TaskB;

import java.util.Timer;

/**
 * 代码清单-p2ch18a-522页a：Timer异常示例
 * author kaoshanji
 * ^_^
 * create time 2025/2/27 17:27
 */
public class TimerException {

    public static void main(String[] args) {

        Timer timer = new Timer();

        timer.schedule(new TaskA(), 1, 1000);
        timer.schedule(new TaskB(), 2000, 1000);

    }

}
